///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Mar  6 2009)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////

#include "paneltaggui.h"

#include "res/edit_add.xpm"
#include "res/edit_del.xpm"

///////////////////////////////////////////////////////////////////////////

PanelTagGui::PanelTagGui( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
	wxBoxSizer* bSizer1;
	bSizer1 = new wxBoxSizer( wxVERTICAL );
	
	m_toolbar = new wxToolBar( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_FLAT|wxTB_HORIZONTAL ); 
	m_toolbar->AddTool( ID_PM_ADD_TAG, _("Add tag"), wxBitmap( edit_add_xpm ), wxNullBitmap, wxITEM_NORMAL, _("Add tag"), _("Add tag") );
	m_toolbar->AddTool( ID_PM_DEL_TAG, _("Del tag"), wxBitmap( edit_del_xpm ), wxNullBitmap, wxITEM_NORMAL, _("Del tag"), _("Del  tag") );
	m_toolbar->Realize();
	
	bSizer1->Add( m_toolbar, 0, wxEXPAND, 5 );
	
	m_listTag = new wxListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_NEEDED_SB|wxLB_SINGLE ); 
	bSizer1->Add( m_listTag, 1, wxALL|wxEXPAND, 5 );
	
	this->SetSizer( bSizer1 );
	this->Layout();
	bSizer1->Fit( this );
	
	// Connect Events
	this->Connect( ID_PM_ADD_TAG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( PanelTagGui::OnAddTag ) );
	this->Connect( ID_PM_DEL_TAG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( PanelTagGui::OnDelTag ) );
	m_listTag->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( PanelTagGui::OnTagActivated ), NULL, this );
}

PanelTagGui::~PanelTagGui()
{
	// Disconnect Events
	this->Disconnect( ID_PM_ADD_TAG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( PanelTagGui::OnAddTag ) );
	this->Disconnect( ID_PM_DEL_TAG, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( PanelTagGui::OnDelTag ) );
	m_listTag->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( PanelTagGui::OnTagActivated ), NULL, this );
}
